package h.a.a.k;

import h.a.a.a;
import h.a.a.d;
import h.a.a.f;
import h.a.a.k.i.b;
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;

/* compiled from: WhereCollector */
public class h<T> {
    public final a<T, ?> a;
    public final List<i> b = new ArrayList();

    public h(a<T, ?> aVar, String str) {
        this.a = aVar;
    }

    public void a(StringBuilder stringBuilder, String str, List<Object> list) {
        ListIterator listIterator = this.b.listIterator();
        while (listIterator.hasNext()) {
            if (listIterator.hasPrevious()) {
                stringBuilder.append(" AND ");
            }
            i iVar = (i) listIterator.next();
            iVar.a(stringBuilder, str);
            iVar.b(list);
        }
    }

    public void b(i iVar) {
        if (iVar instanceof b) {
            f fVar = ((b) iVar).c;
            a aVar = this.a;
            if (aVar != null) {
                Object obj = null;
                for (f fVar2 : aVar.getProperties()) {
                    if (fVar == fVar2) {
                        obj = 1;
                        break;
                    }
                }
                if (obj == null) {
                    StringBuilder g = c.b.a.a.a.g("Property '");
                    g.append(fVar.c);
                    g.append("' is not part of ");
                    g.append(this.a);
                    throw new d(g.toString());
                }
            }
        }
    }
}
